import 'package:flutter/material.dart';
import '../../../utils/base.dart';
import '../../../widgets/tabs.dart';

import 'components/icon_list_item.dart';

class DetailTicket extends StatelessWidget {
  const DetailTicket({Key key}) : super(key: key);

  Widget _tab1() {
    return ListView(
      children: <Widget>[
        IconListItem(
          icon: 'https://wx4.sinaimg.cn/mw690/e927d912ly1g5mixx8392j20u0140qd0.jpg',
          title: '儿童超级乐园门票',
          subtitle: '门票ID：234234',
          time: '截止至2109-12-01',
          rightText: '次票',
          rightTextColor: HexColor('3ec270'),
          rightBackgroundColor: HexColor('eaffeb'),
        ),
      ],
    );
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      child: XTabBar(
        tabs: [
          XTab('可用'),
          XTab('不可用')
        ],
        contents: <Widget>[
          _tab1(),
          Text('不可用')
        ],
      ),
    );
  }
}